local skill = fk.CreateSkill{
  name = "iberia__huwei"
}

Fk:loadTranslationTable{
  [skill.name] = "虎威",
  [":"..skill.name] = "你可以将一张红色牌当【杀】或黑色牌当【水淹七军】使用或打出。",
}

local huwei_cards = {[Card.Red] = "slash", [Card.Black] = "iberia__drowning"}

skill:addEffect("viewas", {
  anim_type = "offensive",
  pattern = "slash,drowning",
  card_filter = function (self, player, to_select, selected)
    return #selected == 0
  end,
  view_as = function (self, player, cards)
    if #cards ~= 1 then return end
    local card = Fk:getCardById(cards[1])
    local _card = Fk:cloneCard(huwei_cards[card.color])
    _card.skillName = skill.name
    _card:addSubcards(cards)
    return _card
  end,
})

return skill
